import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-04-26
 * Time: 0:19
 */
public class Homework {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请任意输入一个整数");
        int n = sc.nextInt();
        int i = 0;
        boolean flag = true;
        for (i = 2; i < n; i++) {
            if (n % i == 0) {
                flag = false;
            }
        }

        if (n >= 2){
            if (flag) {
                System.out.println("n=" + n + "是素数");
            }else {
                System.out.println("n=" + n + "不是素数");
            }
        }else {
            System.out.println("输入错误重新输入");
        }
    }
}